<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<head>
    <head th:include="common :: header"></head>
    <!--Font Awesome [ OPTIONAL ]-->
    <link th:href="@{/assets/css/magic-check.min.css}" rel="stylesheet">
</head>

<body>
<div id="page-content">

    <div class="row">
        <div class="col-lg-12">
            <div class="panel">
                <form id="dataForm" class="form-horizontal" th:action="@{${action}}" method="post">
                    <div class="panel-body">
                        <p class="text-main text-bold">基本资料</p>
                        <hr>
                        <div class="form-group">
                            <label class="col-lg-3 col-sm-2 control-label">任务名称</label>
                            <div class="col-lg-7 col-sm-9">
                                <input type="text" class="form-control" name="jobName" placeholder="任务名称"
                                       data-bv-notempty="true"
                                       data-bv-notempty-message="任务名称不能为空"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-3 col-sm-2 control-label">任务组</label>
                            <div class="col-lg-7 col-sm-9">
                                <input type="text" class="form-control" name="jobGroupName" placeholder="任务组"
                                       data-bv-notempty="true"
                                       data-bv-notempty-message="任务组不能为空"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-3 col-sm-2 control-label">bean 名称</label>
                            <div class="col-lg-7 col-sm-9">
                                <input type="text" class="form-control" name="beanName" placeholder="bean 名称"
                                       data-bv-notempty="true"
                                       data-bv-notempty-message="bean 名称不能为空"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-3 col-sm-2 control-label">方法名</label>
                            <div class="col-lg-7 col-sm-9">
                                <input type="text" class="form-control" name="methodName" placeholder="方法名"
                                       data-bv-notempty="true"
                                       data-bv-notempty-message="方法名不能为空"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-3 col-sm-2 control-label">参数</label>
                            <div class="col-lg-7 col-sm-9">
                                <input type="text" class="form-control" name="params" placeholder="参数" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-3 col-sm-2 control-label">cron 表达式</label>
                            <div class="col-lg-7 col-sm-9">
                                <input type="text" class="form-control" name="cronExpression" placeholder="cron 表达式"
                                       data-bv-notempty="true"
                                       data-bv-notempty-message="cron 表达式不能为空"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-3 col-sm-2 control-label">状态</label>
                            <div class="col-lg-7 col-sm-9">
                                <div class="radio">
                                    <label>
                                        <input type="radio" name="state" value="0"
                                               data-bv-notempty="true"
                                               data-bv-notempty-message="状态不能为空" /> 关闭
                                    </label>
                                    <label>
                                        <input type="radio" name="state" value="1" /> 开启
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-3 col-sm-2 control-label">备注</label>
                            <div class="col-lg-7 col-sm-9">
                                <textarea type="text" class="form-control" name="remark" placeholder="备注"></textarea>
                            </div>
                        </div>
                    </div>
                    <div class="panel-footer">
                        <div class="row">
                            <div class="col-sm-12">
                                <button class="btn btn-primary" type="submit">提交</button>
                                <button class="btn btn-default" type="reset">重置</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>


</div>
<!-- END SETTINGS -->
<div th:include="common :: script"></div>
<!--Form validation [ SAMPLE ]-->
<!--<script th:src="@{/assets/js/form-validation.js}"></script>-->
<script>
    $(function () {
        // 表单通过内嵌属性校验数据，具体 http://bootstrapvalidator.votintsev.ru/getting-started/
        $.freedom.action.save(document.getElementsByTagName("form")[0].getAttribute("id"));
    });
</script>
</body>
</html>
